<% if object.errors.any? %>
  <div class='alert alert-danger'>
    <button type="button" class="close" data-dismiss="alert">×</button>

      <% object.errors.full_messages.each do |msg| %>
        <p><%= msg %></p>
      <% end %>

  </div>
<% end %>